package com.longcai.cm.service.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.crypto.digest.MD5;
import com.longcai.cm.common.utils.StringUtil;
import com.longcai.cm.dao.FaMemberMapper;
import com.longcai.cm.domain.FaMember;
import com.longcai.cm.service.FaMemberService;
import com.longcai.cm.base.service.BaseServiceImpl;
import org.springframework.stereotype.Service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Resource;
import java.util.Date;


/**
 * @author LBX
 */
@Service
public class FaMemberServiceImpl extends BaseServiceImpl<FaMember> implements FaMemberService {

    /**
     * @param param 基本参数
     * @return FaMember
     */
    @Override
    public FaMember register(FaMember param) {
        param.setName(StringUtil.convertStr(param.getMobile()));
        param.setCreatetime(DateUtil.currentSeconds());
        param.setPid(param.getPid());
        save(param);
        return param;
    }

}
